from core.basehandler import BaseHandler
from core.room import Room
#from items.knife import Knife
from core.action import Action

class Sea10BoatFire(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        #add inventory items
        #self.add_item(Knife())

        # build list of actions
        self.add_action(Next)    
        
    # return description of room.
    def get_description(self):
        return "As you beam with pride examining your catch laying dead on the deck, you fumble with the lighter as you try to cook it.  Like the novice you are, the lighter catches your raft's canopy on fire, trapping you inside and quickly engulfing the entire raft.  You scream out as you trip over your cooked catch on the deck. "
        
    # return image of room
    def get_image(self):
        return 'sea10boatfire_pic.jpg'
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return Sea10BoatFire

class Sea10BoatFireHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return Sea10BoatFire
# define actions for this room

class Next(Action):
    def __init__(self):
        Action.__init__(self, "Next")    # do basic initialization for every action
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'sea11finaldeath'
    
    def get_description(self):
        return "Next"
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
    
    def do_action(self,game,room,request):
        room.inventory.clear()
        player = game.get_player()
        player.inventory.clear()
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"